using System;
using System.Windows.Forms;

namespace gpcx
{
    public partial class CodeDetialUcFrm : UserControl
    {
        public CodeDetialUcFrm()
        {
            InitializeComponent();
        }

        public void SetValue(ValueTuple<string, string, string, string, string, string, string> param)
        {
            if (string.IsNullOrEmpty(param.Item6))
            {
                label1.Text = $"{param.Item1} {param.Item2}";
                label2.Text = $"当前: {param.Item3} 涨跌幅{param.Item5}%";
                Height = 30;
            }
            else
            {
                label1.Text = $"{param.Item1} {param.Item2}";
                label2.Text = $"当前: {param.Item3} {param.Item5}%[{param.Item4}]";
                label3.Text = param.Item6;
                Height = 48;
            }
        }
    }
}
